package cn.mdmm.base;

import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.weixin.config.WxConfig;
import com.weixin.core.TokenFactory;

import cn.mdmm.common.MemchWeixinToken;
import cn.modoumama.common.spring.SpringUtils;

/**
 *junits测试类，其他测试类只需要继承该类，就可以直接使用spring
 */

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring/applicationContext.xml")
public abstract class BaseSpringJunitTestCase{
    @Before
    public void init() throws Exception {
    	WxConfig.token = "dabootest1234567890";
		TokenFactory.initialWeixinToken(SpringUtils.getBean(MemchWeixinToken.class));
    }
}
